GtkStyleContext *context;
GtkStateFlags state;
GtkBorder padding;
- gint width, focus_width, focus_pad;
+ gint width, focus_width;
gtk_widget_style_get (widget,
"focus-line-width", &focus_width,
- "focus-padding", &focus_pad,
NULL);
context = gtk_widget_get_style_context (widget);
gtk_widget_get_allocation (widget, &allocation);
- width = allocation.width - 2 * (focus_width + focus_pad);
+ width = allocation.width - 2 * focus_width;
/* constrain the handle within the trough width */
if (position > (width / 2) - padding.right)
GtkStyleContext *context;
GtkStateFlags state;
GtkBorder padding;
- gint width, slider_width, focus_width, focus_pad;
+ gint width, slider_width, focus_width;
PangoLayout *layout;
PangoRectangle logical_rect;
gtk_widget_style_get (widget,
"slider-width", &slider_width,
"focus-line-width", &focus_width,
- "focus-padding", &focus_pad,
NULL);
- slider_width = MAX (slider_width, 3 * (focus_width + focus_pad));
+ slider_width = MAX (slider_width, 3 * focus_width);
/* Translators: if the "on" state label requires more than three
* glyphs then use MEDIUM VERTICAL BAR (U+2759) as the text for
GtkStyleContext *context;
GtkStateFlags state;
GtkBorder padding;
- gint height, focus_width, focus_pad, slider_width, min_height;
+ gint height, focus_width, slider_width, min_height;
PangoLayout *layout;
PangoRectangle logical_rect;
gchar *str;
gtk_widget_style_get (widget,
"slider-width", &slider_width,
"focus-line-width", &focus_width,
- "focus-padding", &focus_pad,
NULL);
- min_height = MAX (slider_width * 0.6, 3 * (focus_width + focus_pad));
+ min_height = MAX (slider_width * 0.6, 3 * focus_width);
str = g_strdup_printf ("%s%s",
C_("switch", "ON"),
if (gtk_widget_has_visible_focus (widget))
{
- gint focus_width, focus_pad, pad;
+ gint focus_width;
gtk_widget_style_get (widget,
"focus-line-width", &focus_width,
- "focus-padding", &focus_pad,
NULL);
- pad = focus_pad + focus_width;
-
gtk_render_focus (context, cr,
- handle.x + pad, handle.y + pad,
- handle.width - pad*2, handle.height - pad*2);
+ handle.x + focus_width, handle.y + focus_width,
+ handle.width - focus_width*2, handle.height - focus_width*2);
}
return FALSE;